---
title: destroy
---

<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements.  See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<a id="concept_B8A3E21674294C65AE9F9A60F37A284E"></a>


Delete or unregister functions, remove indexes, disk stores and regions.

-   **[destroy disk-store](../../../tools_modules/gfsh/command-pages/destroy.html#topic_yfr_l2z_ck)**

    Deletes a disk store and all files on disk used by the disk store. Data for closed regions that previously used this disk store is lost.

-   **[destroy function](../../../tools_modules/gfsh/command-pages/destroy.html#topic_E48C2DF809054C12A162026D8A2139BB)**

    Destroy or unregister a function.

-   **[destroy index](../../../tools_modules/gfsh/command-pages/destroy.html#topic_D00219CCD6F64C1582A0802AC5CDF3F3)**

    Destroy or remove the specified index.

-   **[destroy region](../../../tools_modules/gfsh/command-pages/destroy.html#topic_BEDACECF4599407794ACBC0E56B30F65)**

    Destroy or remove a region.

## <a id="topic_yfr_l2z_ck" class="no-quick-link"></a>destroy disk-store

Deletes a disk store and all files on disk used by the disk store. Data for closed regions that previously used this disk store are lost.

**Availability:** Online. You must be connected in `gfsh` to a JMX Manager member to use this command.

**Syntax:**

``` pre
destroy disk-store --name=value [--group=value(,value)*]
```

<a id="topic_yfr_l2z_ck__table_ypc_1dh_2w"></a>

| Name                                          | Description                                                                                                                          |
|-----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
| <span class="keyword parmname">\\-\\-name</span>  | *Required.* Name of the disk store to be deleted.                                                                                    |
| <span class="keyword parmname">&#8209;&#8209;group</span> | Group(s) of members on which the disk store will be destroyed. If no group is specified, the disk store is destroyed on all members. |

<span class="tablecap">Table 1. Destroy Disk-Store Parameters</span>

**Example Commands:**

``` pre
destroy disk-store --name=store1
```

**Sample Output:**

``` pre
gfsh>destroy disk-store --name=store1
Member  | Result
------- | -------
server1 | Success
```

## <a id="topic_E48C2DF809054C12A162026D8A2139BB" class="no-quick-link"></a>destroy function

Destroy or unregister a function.

The default is for the function to be unregistered from all members.

**Availability:** Online. You must be connected in `gfsh` to a JMX Manager member to use this command.

**Syntax:**

``` pre
destroy function --id=value [--group=value] [--member=value]
```

<a id="topic_E48C2DF809054C12A162026D8A2139BB__table_rq1_ddh_2w"></a>

| Name                                           | Description                                                                                |
|------------------------------------------------|--------------------------------------------------------------------------------------------|
| <span class="keyword parmname">\\-\\-id</span>     | *Required.* Unique function identifier. Use the `list functions` command to obtain the ID. |
| <span class="keyword parmname">\\-\\-groups</span> | One or more groups of members from which this function will be unregistered.               |
| <span class="keyword parmname">&#8209;&#8209;member</span> | Name or ID of the member from which this function will be unregistered.                    |

<span class="tablecap">Table 2. Destroy Function Parameters</span>

**Example Commands:**

``` pre
(1) destroy function --id=InterestCalculations
(2) destroy function --id=InterestCalculations --member=server1
(3) destroy function --id=InterestCalculations --group=Group1
```

## <a id="topic_D00219CCD6F64C1582A0802AC5CDF3F3" class="no-quick-link"></a>destroy index

Destroy or remove the specified index.

**Availability:** Online. You must be connected in `gfsh` to a JMX Manager member to use this command.

**Syntax:**

``` pre
destroy index [--name=value] [--region=value] [--member=value] 
[--group=value]
```

**Note:**
You must specify at least one of the parameter options. If you enter `destroy index` without any parameters, the command will ask you to specify at least one option.

<a id="topic_D00219CCD6F64C1582A0802AC5CDF3F3__table_n24_fdh_2w"></a>

| Name                                           | Description                                                                  |
|------------------------------------------------|------------------------------------------------------------------------------|
| <span class="keyword parmname">\\-\\-name</span>   | Name for the index to be removed.                                            |
| <span class="keyword parmname">\\-\\-member</span> | Id of the member on which index is to be created.                            |
| <span class="keyword parmname">\\-\\-region</span> | Name of the region , from where an index or all indexes are to be destroyed. |
| <span class="keyword parmname">\\-\\-group</span>  | The index will be created on all the members in this member group.           |

<span class="tablecap">Table 3. Destroy Index Parameters</span>

**Example Commands:**

``` pre
destroy index --member=server2
destroy index --name=MyKeyIndex
```

## <a id="topic_BEDACECF4599407794ACBC0E56B30F65" class="no-quick-link"></a>destroy region

Destroy or remove a region.

**Availability:** Online. You must be connected in `gfsh` to a JMX Manager member to use this command.

**Syntax:**

``` pre
destroy region --name=value
```

<a id="topic_BEDACECF4599407794ACBC0E56B30F65__table_yb5_3dh_2w"></a>

| Name                                         | Description                                            |
|----------------------------------------------|--------------------------------------------------------|
| <span class="keyword parmname">\\-\\-name</span> | *Required.* Name and path of the region to be removed. |

<span class="tablecap">Table 4. Destroy Region Parameters</span>

**Example Commands:**

``` pre
destroy region --name=region4
destroy region --name=/region1/subregion1
```

**Sample Output:**

``` pre
gfsh>destroy region --name=region1
"region1"  destroyed successfully.
```


